import pytest

@pytest.fixture
def start():
    print('手工编写测试夹具启动')
    yield start
    print('手工编写测试夹具结束')

class Test_pytest:
    def setup_method(self):
        print('用例执行前执行')
    def teardown_method(self):
        print('用例执行后执行')
    def test_01(self):
        print('执行用例1')
    def test_02(self, start):
        print('执行用例2')

if __name__ == '__main__':
    pytest.main()